<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>test</title>
    <script src="js/qwebchannel.js"></script>
</head>

<body style="background:#282c34;">
<h3 style="color:#ffffff;">this is web page</h3>
<input type="button" value="C++ function callback" onclick="onShowMsgBox()">
<script>
    new QWebChannel(qt.webChannelTransport, function(channel) {
        window.bridge = channel.objects.bridge;
    })
    function onShowMsgBox() {
        if (bridge) {
            bridge.showMsgBox()
        }
    }

    function showAlert() {
        alert('this is web alert');
    }

</script>
</body>
</html>
